﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;

public partial class Whir_System_Module_Statis_Statis : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
        }
    }

    private void BindData()
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("select count(*) from Whir_U_Message where (IsHandle!='是' or IsHandle is Null) And TypeID=31;"); //知识产权服务
        sb.Append("select count(*) from Whir_U_Message where (IsHandle!='是' or IsHandle is Null) And TypeID=39;"); //工商注册
        sb.Append("select count(*) from Whir_U_Message where (IsHandle!='是' or IsHandle is Null) And TypeID=86;"); //其他咨询
        sb.Append("select count(*) from Whir_U_Message where (IsHandle!='是' or IsHandle is Null) And TypeID=89;"); //建议与反馈

        DataSet ds = Whir.SQLServerDAL.DbHelperSQL.Query(sb.ToString());
        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows[0][0].ToString() != "0")
            {
                this.Literal1.Text = "<a href='../CommonContents/ContentManage.aspx?ModelID=5&ModelFormID=18&TypeID=31'>" + ds.Tables[0].Rows[0][0].ToString() + "条</a>";

            }
            if (ds.Tables[1].Rows[0][0].ToString() != "0")
            {
                this.Literal2.Text = "<a href='../CommonContents/ContentManage.aspx?ModelID=5&ModelFormID=18&TypeID=39'>" + ds.Tables[1].Rows[0][0].ToString() + "条</a>";
            }
            if (ds.Tables[2].Rows[0][0].ToString() != "0")
            {
                this.Literal3.Text = "<a href='../CommonContents/ContentManage.aspx?ModelID=5&ModelFormID=18&TypeID=86'>" + ds.Tables[2].Rows[0][0].ToString() + "条</a>";
            }
            if (ds.Tables[3].Rows[0][0].ToString() != "0")
            {
                this.Literal4.Text = "<a href='../CommonContents/ContentManage.aspx?ModelID=5&ModelFormID=18&TypeID=89'>" + ds.Tables[3].Rows[0][0].ToString() + "条</a>";
            }
        }
    }
}
